<?php
	require('core.php');
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>搜索</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no" />
<meta name="full-screen" content="yes"/>
<meta name="browsermode" content="application"/>
<!-- QQ强制竖屏 QQ强制全屏 -->
<meta name="x5-orientation" content="portrait"/>
<meta name="x5-fullscreen" content="true"/>
<meta name="x5-page-mode" content="app"/>   
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" type="text/css" href="/wap/css/reset.css">
<link rel="stylesheet" type="text/css" href="/wap/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="/wap/css/main.css">
<link rel="stylesheet" type="text/css" href="/wap/css/index.css">
<link rel="stylesheet" type="text/css" href="/wap/css/new.css">
<link rel="stylesheet" type="text/css" href="/wap/css/address.css">
<style>
	body{
		background:#fff;
	}
	.with-home-logo{
		background:none;
	}
	.header-logo{
		text-align:center;
	}
	.header-logo img{
		width: 48px;
		height: 48px;
		vertical-align: middle;
	}
	.wrapper{
		position:relative;
	}
	#container{
		height: 300px;
	}
	.pdlist-iwc-pdname{
			font-size: 18px;
			color:#333;
		}
		.pdlist-iw-imgwp{
			width: 80px;
			height: 80px;
		}
		.pdlist-iw-imgwp img{
			width: 80px;
			height: 80px;
		}
		.pdlist-iw-cnt{
			float: left;
			margin-left: 0;
		}
		.pdlist-iwc-pdcomment,.pdlist-iwc-pdsales{
			font-size: 12px;
			color:#333;
		}
		.pdlist-iw-buy{
			float: right;
		}
		.pdlist-item-wrap{
			float: left;
		}
		.pdlist-item:after{
			content:"";
			display: block;
			clear: both;
		}
		.pdlist-iw-buy p:after{
			display: block;
			content:"";
			clear: both;
		}
		.pdlist-iw-buy p{
			margin:5px 0;
		}
		.key-no{
			line-height: 32px;
		}
		.ncs-info .scontent dl dt{
			width: 88px;
		}
		.rinfo-datas{
			margin:10px;
		}
		.rinfo-data {
		    width: 25%;
		    padding: .4rem 0;
		    border-left: 1px solid #eee;
		    text-align: center;
		    line-height: 1;
		    float: left;
		}
		.rinfo-data:first-child {
		    border-left: none;
		}
		.rinfo-datas:after{
			content:"";
			display: block;
			clear: both;
		}
		.rinfo-data p{
			margin-bottom: 5px;
		}
		.content:after{
			content:"";
			display: block;
			clear: both;
		}
		.pdlist-iw-imgwp{
			float: left;
		}
</style>
</head>
<body>
	<header id="header">
		<div class="header-wrap">
			<a href="javascript:history.back();" class="header-back"><span>返回</span></a>
			<h2>搜索商品</h2>
		</div>
	</header>
	<div style='height: 50px;'>
		
	</div>
	<div class="wrapper">
		<div class="geo-search">
			<form action="/wap/tmpl/product_list.php" >
			<input id="suggestId" type="text" name='keyword' class="geo-search-input" placeholder="输入商品名称或关键字">
			<style>
				.geo-search div{
					padding-top: 5px;padding-bottom: 10px;overflow: hidden;
				}
				.geo-search div a{
					margin-right: 10px;
					color: #555;
				}
				.geo-search div a:actived{
					color: #555;
				}
			</style>
			<div style=''>
				<?php
					$keys = explode(',',$hot_search);
					foreach($keys as $key){
				?>
				<a href="/wap/tmpl/product_list.php?keyword=<?php echo $key;?>"><?php echo $key;?></a>
				<?php			
					}
				?>
			</div>
			<button class="geo-search-btn">搜索</button>
			</form>
		</div>
	</div>
	<div id="recipe-list"></div>
	<div id="store-list"></div>
	<script type="text/html" id="recipe-list-tmpl">
		<% if(goods_list.length >0){%>	
		<ul class="product-list">
			<%for(i=0;i<goods_list.length;i++){%>
			<li class="pdlist-item" goods_id="<%=goods_list[i].goods_id;%>">
				<a href="product_detail.html?goods_id=<%=goods_list[i].goods_id;%>" class="pdlist-item-wrap clearfix">
					<span class="pdlist-iw-imgwp">
						<img src="<%=goods_list[i].goods_image_url;%>"/>
					</span>
					<div class="pdlist-iw-cnt">
						<p class="pdlist-iwc-pdname">
							<%=goods_list[i].goods_name;%>
						</p>
						<p><span>图片仅供参考</span></p>
						<p class="pdlist-iwc-pdprice">
							￥<%=goods_list[i].goods_price;%>
							<%
								if(goods_list[i].group_flag){
							%>
								<span class="product-status bg-yf8">团</span>
							<%
								}
								if(goods_list[i].xianshi_flag){
							%>
								<span class="product-status bg-blue">降</span>
							<%
								}
							%>
						</p>
						<p class="pdlist-iwc-pdcomment  clearfix">
							<span class="evaluation_good_swp mr5 fleft">
							<%
								for(var s = 0;s<goods_list[i].evaluation_good_star;s++){
							%>
								<span class="evaluation_good_star fleft"></span>
							<%
								}
							%>
							</span>
							<span class="fleft">
								<%=goods_list[i].evaluation_count;%>人评价
							</span>							
						</p>
						<p class="pdlist-iwc-pdsales">
							<span>月销<%=goods_list[i].goods_salenum%>份</span>
						</p>
						<p>
							
						</p>
					</div>
				</a>
				<!-- <div class="pdlist-iw-buy">
					<p>
					<span>库存</span><span>(<%=goods_list[i].goods_storage%>件)</span></p>
					<p>
						<span class="key-no fleft">
							数量：
						</span>
						<span class="minus-wp fleft">
								<span class="i-minus"></span>
						</span>
						<input type="text" class="buy-num fleft" id="buynum" value="1"/>
						<span class="add-wp fleft">
							<span class="i-add"></span>
						</span>
					</p>
					<p><a href="">立即购买</a></p>
					<p><a href="">预约</a></p>
				</div> -->
			</li>
			<%}%>
		</ul>
	<%
	   }
	%>
	</script>
	<script type="text/html" id="store-list-tmpl">
		<% if(shop_list.length >0){%>
                <div class="shop-list">
                    <% for (var i = 0;i<shop_list.length;i++){%>
                        <a href="tmpl/go_store.html?store_id=<%=shop_list[i].store_id%>" class="shop-list-item">
                        	<div class="shop_pic">
								<img src="<%=shop_list[i].store_logo%>" alt="">
                        	</div>
                            <div class="shop-shop-name">
								<div class="shop-name">
									<span><%=shop_list[i].store_name%></span>
									<span></span>
								</div>
                                <div class="eval">
									<span class="seller-heart level-<%= shop_list[i].store_credit_average%>"></span>
                                </div>
                                <div class="delivery">
                                	<p><span><%=shop_list[i].store_delivery_time%>取送</span></p>
                                	<p><span><%=shop_list[i].store_deliverytime%>分钟</span>/<span><%=shop_list[i].distance%>米</span></p>
                                	<% if(shop_list[i].is_appoint_discount){%>
                                	<p><strong>预</strong>&nbsp;&nbsp;<span><%=shop_list[i].appoint_discount_time%>点前预订<%=shop_list[i].appoint_discount%>折</span></p>
                                	<% }%>
                                	<% if(shop_list[i].store_is_delivery){%>
                                	<p><strong class="on">送</strong>&nbsp;&nbsp;<span>商家配送</span></p>
                                	<% }else{%>
                                	<p><strong class="over">送</strong>&nbsp;&nbsp;<span>商家没有能力配送</span></p>
                                	<%}%>
                                	<% if(shop_list[i].xianshi==1){%>
                                	<p><strong class="xianshi_zhe">折</strong>&nbsp;&nbsp;<span>当天菜品当天销售，超过<%shop_list[i].store_xianshi_time%>点后，限时打折促销，销售不完，所有菜品全倒掉。</span></p>
                                	<%}%>
									<!-- <span class="delivery-money"><%=shop_list[i].store_free_price%>元起送</span>/
									<span class="delivery-time"><%=shop_list[i].store_deliverytime%>分钟</span>/
									<span class="delivery-distance"><%=shop_list[i].distance%>米</span> -->
                                </div>
                            </div>
                            <div class="shop-intro">
                                <p>
                                	<span>
                                		￥<%=shop_list[i].store_free_price%>元起送
                                	</span>
                                </p>
                                <p>
                                	<span>
                                		￥<%=shop_list[i].store_delivery_price%>元配送费
                                	</span>
                                </p>
                                <p>
                                <% if(shop_list[i].store_baozhopen==1){%>
                                	<span>保</span>
                                <%}%>
                                <% if(shop_list[i].store_baozhopen==1){%>
                                	<span>限</span>
                                <%}%>
                                <% if(shop_list[i].store_baozhopen==1){%>
                                	<span>机</span>
                                <%}%>
                                <% if(shop_list[i].store_baozhopen==1){%>
                                	<span>认</span>
                                <%}%>
                                <% if(shop_list[i].is_appoint_discount==1){%>
                                	<span class="discount">折</span>
                                <%}%>
                                </p>		
                            </div>
                            <div class="flr"></div>
                        </a>
                    <%}%>
                    
                </div>
            <%}else{%>
                <div class="no-record m10">
                    暂无记录
                </div>
            <%}%>
	</script>
	<?php
		require('simple_footer.php');
	?>
	<footer id="footer"></footer>
	<script type="text/javascript" src="../js/jquery.min.js"></script>
	<script type="text/javascript" src="../js/config.js"></script>
	<script type="text/javascript" src="../js/zepto.min.js"></script>
	<script type="text/javascript" src="../js/template.js"></script>
	<script type="text/javascript" src="../js/common.js"></script>
	<script type="text/javascript" src="../js/swipe.js"></script>
	<script type="text/javascript" src="../js/tmpl/footer.js"></script>
	<script type="text/javascript" src="../js/tmpl/search.js"></script>
	
	
</body>
</html>